<template>
    <page-body>
        <view class="page">
            <view class="flex benben-position-layout flex flex-wrap align-center balanceDetails_flex_0" :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
                <view class='flex flex-wrap align-center justify-between flex-sub balanceDetails_fd0_0'>
                    <view class='flex flex-wrap align-center balanceDetails_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
                        <text class='fu-iconfont2  balanceDetails_fd0_0_c0_c0'>&#xe794;</text>
                    </view>
                    <view class='flex flex-wrap align-center'>
                        <text class='balanceDetails_fd0_0_c1_c0'>余额明细</text>
                        <view class='flex flex-wrap align-center'>
                            <image class='balanceDetails_fd0_0_c1_c1_c0' mode="aspectFit" :src='STATIC_URL+"78.png"' @tap.stop="popupShow1716428814722=true"></image>
                        </view>
                    </view>
                    <view class='flex flex-wrap align-center justify-end balanceDetails_fd0_0_c0'>
                    </view>
                </view>

            </view>
            <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
            <!---flex布局flex布局开始-->
            <view class="flex benben-flex-layout flex-wrap align-center">
                <view>
                    <benben-flex-tabs class-name='balanceDetails_benbenTabsfd1_0' v-model="tabs" ref="benben_tabsfd1_0" select-mark="benben_tabsfd1_0" 
					key="benben_tabsfd1_0" :open-title-type='false' :open-sticky='true' :top='88' :is-show-content='false' :scrollspy='false' 
					:tabs-info.sync="tabsInfofd1_0" @change="getpc36dfee37deefFunc">

                        <scroll-view @scroll="tabsInfofd1_0.scrollX = $event.detail.scrollLeft" id="benben_tabsfd1_0" class="benben-tabs" style="width:750rpx" :scroll-x="true" :scroll-left.sync="tabsInfofd1_0.moveX" scroll-with-animation="all .3s ease">
                            <view class="benben-tabs-content" id="benben_tabsfd1_0-content">
                                <view id="benben_tabsfd1_0-title" class="benben-tabs-title flex align-center justify-around flex ">
                                    <view :class="{ 'checkTitlefd1_0': tabs == '0', 'flex flex-wrap align-center': true }" @tap="tabs = '0'" :id="`benben_tabsfd1_0-title-item-${'0'}`">

                                        <text>全部</text>

                                    </view>
                                    <view :class="{ 'checkTitlefd1_0': tabs == '1', 'flex flex-wrap align-center': true }" @tap="tabs = '1'" :id="`benben_tabsfd1_0-title-item-${'1'}`">

                                        <text>收入记录</text>

                                    </view>
                                    <view :class="{ 'checkTitlefd1_0': tabs == '2', 'flex flex-wrap align-center': true }" @tap="tabs = '2'" :id="`benben_tabsfd1_0-title-item-${'2'}`">

                                        <text>支出记录</text>

                                    </view>
                                </view>
                                <view :style="{ left: tabsInfofd1_0.lineleft, maxWidth: tabsInfofd1_0.lineWidth ,}" id="benben_tabsfd1_0-line" class="benben-tabs-line flex benben-flex-tabs-line balanceDetails_linefd1_0"></view>
                            </view>
                        </scroll-view>

                    </benben-flex-tabs>

                </view>
            </view>

            <!---flex布局flex布局结束-->
            <!---flex布局flex布局开始-->
            <view class="flex benben-flex-layout flex-wrap align-center balanceDetails_flex_2" v-if=" star_time!=''">
                <text>时间：</text>
                <text>{{star_time}}</text>
                <text class='balanceDetails_fd2_2'>--</text>
                <text>{{end_time}}</text>
                <image class='balanceDetails_fd2_4' mode="aspectFit" :src='STATIC_URL+"48.png"' @tap.stop="qingkFunc()"></image>
            </view>

            <!---flex布局flex布局结束-->
            <!---flex布局flex布局开始-->
            <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout balanceDetails_flex_3">
                <template v-for='(item,key0) in list'>
                    <view class='flex flex-wrap align-center balanceDetails_fd3_0' :key='key0'>
                        <view class='flex flex-direction flex-wrap align-stretch flex-sub balanceDetails_fd3_0_c0'>
                            <text class='balanceDetails_fd3_0_c0_c0'>{{item.remark}}</text>
                            <text class='balanceDetails_fd3_0_c0_c1'>{{item.create_time}}</text>
                        </view>
                        <view class='flex flex-direction flex-wrap align-end self-start'>
                            <text class='balanceDetails_fd3_0_c1_c0' :class="item.money_type == 1 ? 'yangshi' : ''">{{item.change_money}}</text>
                            <text class='balanceDetails_fd3_0_c0_c1' v-if="item.change_type == 5 || item.change_type == 6" @tap.stop="chakan(item)">详情 ></text>
                        </view>
                    </view>
                </template>
                <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData" :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
            </view>

            <!---flex布局flex布局结束-->
            <benben-popup v-model="popupShow1716428814722" :mask="true" :mask-close-able="true" mode='center'>
                <!---flex布局flex布局开始-->
                <view class="flex benben-flex-layout flex-wrap align-center balanceDetails_flex_4">
                    <benben-calendar-diy mode='range' year-arrow-color='#666666' month-arrow-color='#666666' start-text=' ' end-text=' ' 
					:change-title='true' :change-year='true' :change-month='true' class='balanceDetails_fd4_0' @change="windowFunc()" 
					:start-time.sync="star_time" :end-time.sync="end_time"></benben-calendar-diy>
                </view>

                <!---flex布局flex布局结束-->

            </benben-popup>


        </view>
    </page-body>
</template>
<script>
    import pagingList from '@/common/mixin/paging_list.js';
    import {
        validate
    } from '@/common/utils/validate.js'

    export default {
        components: {},
        mixins: [pagingList],

        data() {
            return {
                "popupShow1716428814722": false,
                "tabsInfofd1_0": {
                    lineleft: '',
                    lineWidth: '',
                    moveX: 0,
                    scrollX: 0,
                    PageScrollX: 0
                },
                "minixPagingListsApi": "",
                "pageingListApiMethod": "",
                "allowOnloadGetList": false,
                "tabs": "0",
                "star_time": "",
                "end_time": "",
                "list": []
            };
        },
        computed: {

        },
        watch: {},
        onLoad(options) {

        },
        onUnload() {

        },
        onReady() {

        },
        onShow() {
            this.getpc36dfee37deefFunc()
        },
        onHide() {

        },
        onResize() {

        },
        onPullDownRefresh() {

        },
        onReachBottom(e) {

        },
        onPageScroll(e) {

        },
        methods: {
			chakan(item){
				if(item.change_type == 5){
					uni.navigateTo({
						url: `/pages/order/detailsDd/detailsDd?order_sn=${item.order_sn}&order_id=${item.order_id}&orderType=1`
					})
				}else{
					uni.navigateTo({
						url: `/pages/order/legDdXq/legDdXq?order_sn=${item.order_sn}&order_id=${item.order_id}&orderType=2`
					})
				}
			},
            //隐藏弹窗
            windowFunc() {
                this.popupShow1716428814722 = false;
				this.getpc36dfee37deefFunc()
            },
            //钱包-余额明细
            getpc36dfee37deefFunc() {
                this.minixPagingListsApi = global.apiUrls.post636dfee37deef;
                this.pageingListApiMethod = 'get';
                this.allowOnloadGetList = false;
                this.pagingListPostDataContent = {
                    create_time: this.star_time,
                    money_type: this.tabs,
                    end_time: this.end_time,
                    type: '2',
                    user_role: '1'
                }
                this.listData = [];
                this.list = this.listData;
                this.pagingListToggle();

            },
            //清空
            qingkFunc() {
                this.star_time = '';
                this.end_time = '';
				this.popupShow1716428814722 = false
                this.getpc36dfee37deefFunc()
            },
            pagingListPostData() {
                return this.pagingListPostDataContent
            }
        }
    };
</script>
<style lang="scss" scoped>
    .page {
        width: 100vw;
        overflow-x: hidden;
        min-height: calc(100vh - var(--window-bottom));
        background: rgba(248, 248, 248, 1);
        background-size: 100% auto;
    }

    .balanceDetails_flex_0 {
        background: #fff;
        width: 750rpx;
        height: 88rpx;
        overflow: hidden;
        z-index: 10;
        top: 0rpx;
        background-size: 100% auto !important;
    }

    .balanceDetails_fd0_0_c1_c1_c0 {
        width: 36rpx;
        height: 36rpx;
        margin: 0rpx 0rpx 0rpx 16rpx;
    }

    .balanceDetails_fd0_0_c1_c0 {
        font-size: 36rpx;
        font-weight: 500;
        color: #333;
    }

    .balanceDetails_fd0_0_c0_c0 {
        font-size: 32rpx;
        color: #333;
    }

    .balanceDetails_fd0_0_c0 {
        width: 120rpx;
        height: 88rpx;
    }

    .balanceDetails_fd0_0 {
        padding: 0rpx 32rpx 0rpx 32rpx;
        height: 88rpx;
    }

    .balanceDetails_linefd1_0 {
        background: url(image-path('52.png')) no-repeat;
        width: 32rpx;
        height: 12rpx;
        top: 70rpx;
        background-size: 100% auto !important;
        border-radius: 10rpx 10rpx 10rpx 10rpx;
    }

    .checkTitlefd1_0 {
        font-weight: 500 !important;
        font-size: 28rpx !important;
        color: #333333 !important;
        background-color: rgba(255, 255, 255, 1) !important;
    }

    ::v-deep .balanceDetails_benbenTabsfd1_0 {
        background: #fff;
        width: 750rpx;
        height: 88rpx;
        white-space: nowrap;
        font-size: 28rpx;
        font-weight: 400;
        color: var(--benbenFontColor1);
    }

    .balanceDetails_flex_2 {
        padding: 32rpx;
    }

    .balanceDetails_fd2_4 {
        width: 32rpx;
        height: 32rpx;
        border-radius: 0rpx 0rpx 0rpx 0rpx;
        margin: 0rpx 0rpx 0rpx 24rpx;
    }

    .balanceDetails_fd2_2 {
        margin: 0rpx 12rpx 0rpx 12rpx;
    }

    .balanceDetails_flex_3 {
        background: var(--benbenbgColor1);
        padding: 0rpx 24rpx 0rpx 24rpx;
        margin: 24rpx 24rpx 0rpx 24rpx;
        background-size: 100% auto;
        border-radius: 16rpx;
    }

    .balanceDetails_fd3_0_c1_c0 {
        color: #999999;
        font-size: 28rpx;
        font-weight: 700;
        line-height: 34rpx;
    }

    .balanceDetails_fd3_0_c0_c1 {
        color: #999999;
        font-size: 24rpx;
        font-weight: 400;
        line-height: 33rpx;
        margin: 15rpx 0rpx 0rpx 0rpx;
    }

    .balanceDetails_fd3_0_c0_c0 {
        color: #333333;
        font-size: 28rpx;
        font-weight: 500;
        line-height: 40rpx;
    }

    .balanceDetails_fd3_0_c0 {
        margin: 0rpx 24rpx 0rpx 0rpx;
    }

    .balanceDetails_fd3_0 {
        border-bottom: 1px solid #eee;
        padding: 32rpx 0rpx 32rpx 0rpx;
    }

    .balanceDetails_flex_4 {
        border-radius: 24rpx;
        width: 622rpx;
    }

    .balanceDetails_fd4_0 {
        background: #ffffff;
        width: 750rpx;
        --range-bg-color: rgba(235, 83, 5, 0.13);
        --active-bg-color: var(--benbenbgColor0);
        border-radius: 24rpx;
    }
	.yangshi{
		color: #FF8E21;
	}
</style>